package com.rt.system.service.impl;

import java.util.List;
import com.rt.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.rt.system.mapper.RtExamTypeMapper;
import com.rt.system.domain.RtExamType;
import com.rt.system.service.IRtExamTypeService;

/**
 * 考试类型Service业务层处理
 * 
 * @author Yg
 * @date 2022-01-05
 */
@Service
public class RtExamTypeServiceImpl implements IRtExamTypeService 
{
    @Autowired
    private RtExamTypeMapper rtExamTypeMapper;

    /**
     * 查询考试类型
     * 
     * @param id 考试类型主键
     * @return 考试类型
     */
    @Override
    public RtExamType selectRtExamTypeById(Long id)
    {
        return rtExamTypeMapper.selectRtExamTypeById(id);
    }

    /**
     * 查询考试类型列表
     * 
     * @param rtExamType 考试类型
     * @return 考试类型
     */
    @Override
    public List<RtExamType> selectRtExamTypeList(RtExamType rtExamType)
    {
        return rtExamTypeMapper.selectRtExamTypeList(rtExamType);
    }

    /**
     * 新增考试类型
     * 
     * @param rtExamType 考试类型
     * @return 结果
     */
    @Override
    public int insertRtExamType(RtExamType rtExamType)
    {
        rtExamType.setCreateTime(DateUtils.getNowDate());
        return rtExamTypeMapper.insertRtExamType(rtExamType);
    }

    /**
     * 修改考试类型
     * 
     * @param rtExamType 考试类型
     * @return 结果
     */
    @Override
    public int updateRtExamType(RtExamType rtExamType)
    {
        rtExamType.setUpdateTime(DateUtils.getNowDate());
        return rtExamTypeMapper.updateRtExamType(rtExamType);
    }

    /**
     * 批量删除考试类型
     * 
     * @param ids 需要删除的考试类型主键
     * @return 结果
     */
    @Override
    public int deleteRtExamTypeByIds(Long[] ids)
    {
        return rtExamTypeMapper.deleteRtExamTypeByIds(ids);
    }

    /**
     * 删除考试类型信息
     * 
     * @param id 考试类型主键
     * @return 结果
     */
    @Override
    public int deleteRtExamTypeById(Long id)
    {
        return rtExamTypeMapper.deleteRtExamTypeById(id);
    }

    @Override
    public String selectRtExamTypeByName(RtExamType rtExamType) {
        return rtExamTypeMapper.selectRtExamTypeByName(rtExamType);
    }
}
